package shop

import (
	"meituan/apps/shop/controllers"

	"github.com/gin-gonic/gin"
)

func IncludeShopRouter(route *gin.RouterGroup, prefix string) {
	group := route.Group(prefix)
	{
		shop := group.Group("/shop")
		{
			shop.GET("/", controllers.ListShop)
			shop.PUT("/", controllers.DeleteShop)
			shop.DELETE("/:id", controllers.DeleteShop)
			shop.POST("/:id", controllers.DeleteShop)
		}
		category := group.Group("/category")
		{
			category.GET("/", controllers.QueryCategory)
			category.DELETE("/:id", controllers.DeleteCategory)
			category.PUT("/", controllers.CreateCategory)
			category.POST("/:id", controllers.UpdateCategory)
		}

		activity := group.Group("/activity")
		{
			activity.GET("/", controllers.QueryActivity)
			activity.DELETE("/:id", controllers.DeleteActivity)
			activity.PUT("/", controllers.CreateActivity)
			activity.POST("/:id", controllers.UpdateActivity)
		}
	}
}
